home *** CD-ROM | disk | FTP | other *** search
- public class ClassMDWeapShop extends Codex {
- private CodexActor owner;
- private String descriptionID = "GEN_MD_WEAPSHOP";
- private int flags;
- private float buyRate = 1.25F;
- private float sellRate = 0.8F;
- private int sellFlags = 243;
- private boolean bActive;
-
- public void clicked(int guid, int clickerGuid, int captureID) {
- if (!this.bActive) {
- this.owner = new CodexActor(((Codex)this).GetClassThing());
- this.bActive = true;
- this.owner.SetThingFlags(64);
- this.BuySellInterface(clickerGuid);
- }
- }
-
- public void BuySellInterface(int shopperGuid) {
- ((Codex)this).AddBuySell("generic_MD_weapon.nbs", ((Codex)this).GetClassThing(), this.descriptionID, this.flags, this.buyRate, this.sellRate, this.sellFlags);
- ((Codex)this).ExecuteBuySell(((Codex)this).GetClassThing(), shopperGuid, 4);
- }
-
- public void buysellended(boolean bAborted) {
- this.bActive = false;
- this.owner.ClearThingFlags(64);
- }
- }
-